package com.study;

/**
 * @author wanghao
 * @version v1.0
 * @description: 用户线程和守护线程
 * @date 2021/12/27 15:32
 * @change [修改时间] [修改者]@[版本号] [修改内容说明]
 */
public class Main {

    public static void main(String[] args) {
        Thread aa = new Thread(()->{
            System.out.println(Thread.currentThread().getName() + "::" + Thread.currentThread().isDaemon());
            while (true) {

            }
        },"aa");

        // 设置守护线程
        aa.setDaemon(true);
        aa.start();

        System.out.println(Thread.currentThread().getName()+" over");
    }
}
